//
//  CustomeNavigationController.m
//  Neka
//
//  Created by yu on 2018/4/14.
//  Copyright © 2018年 ma c. All rights reserved.
//

#import "CustomeNavigationController.h"
#import <objc/runtime.h>
@interface CustomeNavigationController ()

@end

@implementation CustomeNavigationController

- (instancetype)initWithRootViewController:(UIViewController *)rootViewController {
    if (self = [super initWithRootViewController:rootViewController]) {
//        self.navigationBar.translucent = NO;
//        self.edgesForExtendedLayout = UIRectEdgeNone;
//        [self.navigationBar setTintColor:[UIColor whiteColor]];
//        [self.navigationBar setBackgroundImage:[UIImage imageNamed:@"nav_bg"] forBarMetrics:UIBarMetricsDefault];
//        [self.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]}];
        [self.navigationBar setHidden:YES];
    }
    return self;
}

//- (void)viewDidLoad {
//    [super viewDidLoad];
//    
//    //1.获取系统手势
//    UIGestureRecognizer *systemGes = self.interactivePopGestureRecognizer;
//    //2.获取手势添加到的View
//    UIView *gesView = systemGes.view;
//    //3.获取target/action
//    //3.1利用运行时机制查看所有属性的名称
////    unsigned int count = 0;
////    Ivar *ivarList = class_copyIvarList(objc_getClass("UINavigationController"), &count);
////    for (int i = 0; i < count; i++) {
////        Ivar ivar = ivarList[i];
////        NSString *ivarName = [NSString stringWithUTF8String:ivar_getName(ivar)];
////        PPLog(@"%@", ivarName);
////    }
//    //3.2用KVC获取target,
//    NSArray *targets = [systemGes valueForKey:@"_targets"];
//    id targetObjc = targets.firstObject;
//    id target = [targetObjc valueForKey:@"target"];
//    SEL sel = @selector(handleNavigationTransition:);
//    
//    UIPanGestureRecognizer *panGes = [[UIPanGestureRecognizer alloc] initWithTarget:target action:sel];
//    [gesView addGestureRecognizer:panGes];
//
//}






@end
